//相交链表
//不带环，相交返回相交节点；不想交返回NULL；
//思路一：双循环遍历
struct ListNode* getIntersectionNode(struct ListNode* headA, struct ListNode* headB) {
	if (!headA || !headB)
		return NULL;
	struct ListNode* cur1 = headA;
	struct ListNode* cur2 = headB;
	while (cur1)
	{
		cur2 = headB;
		while (cur2)
		{
			if (cur1 == cur2)
				return cur2;
			cur2 = cur2->next;
		}
		cur1 = cur1->next;
	}
	return NULL;
}
		